<template>
  <div style="height:100%;width:100%;position:relative;">
    <div class="pagetop">
      <div style="width:100%">
        <div style="width:100%;float:left">
          <table style="font-size:12px" class="table1style">
            <tr>
              <td>快速查询</td>
              <td>
                <el-input v-model="txtsearch" clearable placeholder="报告单元组合名称或输入码"
                  @keyup.enter.native="initialListSearch"></el-input>
              </td>
              <td>组合类别</td>
              <td>
                <el-select v-model="txtgroupclass" clearable filterable @change="initialListSearch">
                  <el-option v-for="item in groupclassOptions" :key="item.value" :value="item.value" :label="item.label"
                    filter></el-option>
                </el-select>
              </td>

            </tr>
          </table>
        </div>
        <div style="width:100%;float:left;">
          <table style="float:right">
            <tr>
              <td>
                <el-button icon="el-icon-search" type="primary" @click="refreshrecord()" v-has="'PINQUERY'">查询</el-button>
              </td>
              <td>
                <el-button icon="el-icon-plus" @click="OpenDialog(1)" v-has="'PADD'">新增</el-button>
              </td>
              <td>
                <el-button icon="el-icon-edit" @click="OpenDialog(2)" v-has="'PMODIFY'">修改</el-button>
              </td>
              <td>
                <el-button icon="el-icon-delete" @click="OpenDialog(3)" v-has="'PDELETE'">删除</el-button>
              </td>
              <td>
                <el-button icon="el-icon-files" @click="ExportCsv()" v-has="'PEXPORT'">导出</el-button>
              </td>
            </tr>
          </table>
        </div>
      </div>
    </div>
    <div class="pagecenter">
      <div class="middle-center">
        <div ref="xTableDiv" style="height:100%">
          <vxe-table show-overflow ref="xTable1" height="auto" row-id="id" :loading="loading"
            :select-config="{ reserve: true }" :keyboard-config="keyConfig" :keyboard-local-config="keyLocalConfig"
            :data.sync="list" border size="mini" show-header-overflow highlight-current-row highlight-hover-row resizable
            stripe @current-change="currentChangeEvent">
            <vxe-table-column type="index" title="NO." width="45" header-align="center" align="center"></vxe-table-column>
            <vxe-table-column field="rptunitgroupname" title="组合名称" width="100" sortable
              header-align="center"></vxe-table-column>
            <vxe-table-column field="inputcode" title="输入码" width="80" header-align="center"></vxe-table-column>
            <vxe-table-column field="detailcount" title="子项个数" width="75" sortable header-align="center"
              align="center"></vxe-table-column>
            <vxe-table-column field="unitkindname" title="组合类别" width="200" header-align="center"></vxe-table-column>
            <vxe-table-column field="hospitalname" title="医院" width="180" header-align="center"></vxe-table-column>
            <vxe-table-column field="description" title="备注说明" width="150" header-align="center"></vxe-table-column>
            <vxe-table-column field="seq" title="序号" width="60" header-align="center" align="center"></vxe-table-column>
            <vxe-table-column field="rptunitgroupid" title="组合ID" width="70" sortable header-align="center"
              align="center"></vxe-table-column>
          </vxe-table>
        </div>
      </div>
      <div class="middle-right">
        <div ref="xTable2Div" style="height:100%">
          <vxe-table show-overflow border ref="xTable2" height="auto" row-id="id" size="mini" :loading="loading"
            :select-config="{ reserve: true }" :data.sync="tableData2" show-header-overflow highlight-current-row
            highlight-hover-row resizable stripe>
            <vxe-table-column type="index" title="NO." width="45" header-align="center" align="center"></vxe-table-column>
            <vxe-table-column field="rptunitname" title="报告单元名称" width="140" header-align="center"></vxe-table-column>
            <vxe-table-column field="rptunitid" title="报告单元ID" width="90" header-align="center"
              align="center"></vxe-table-column>
            <vxe-table-column field="seq" title="序号" width="55" header-align="center" align="center"></vxe-table-column>
          </vxe-table>
        </div>
      </div>
    </div>
    <el-dialog :title="headtitle" :visible.sync="dialogVisible" :width="dialogwidth" v-el-drag-dialog
      :append-to-body="true" :close-on-click-modal="false">
      <div v-if="dialogshow">
        <div>
          <el-form ref="rptuintgroup" :model="rptuintgroup">
            <table style="text-align:right;font-size:12px;width:100%">
              <tr>
                <td>组 合 &nbsp;ID</td>
                <td>
                  <el-input v-model="rptuintgroup.rptuintgroupid" disabled="disabled"></el-input>
                </td>
                <td>序号</td>
                <td>
                  <el-input v-model.number="rptuintgroup.seq" type="number" ref="popinput1"
                    @keyup.enter.native="inputautofocus($event, 'popinput1')"></el-input>
                </td>
              </tr>
              <tr>
                <td>组合类别</td>
                <td>
                  <el-select v-model="rptuintgroup.groupclass" clearable style="width:100%" ref="popinput2"
                    @keyup.enter.native="inputautofocus($event, 'popinput2')" filterable>
                    <el-option v-for="item in groupclassOptions" :key="item.value" :value="item.value"
                      :label="item.label"></el-option>
                  </el-select>
                </td>
                <td>子项个数</td>
                <td>
                  <el-input v-model="rptuintgroup.subitemnum" ref="popinput3"
                    @keyup.enter.native="inputautofocus($event, 'popinput3')" readonly></el-input>
                </td>
              </tr>
              <tr>
                <td>
                  <font color="#F56C6C">组合名称</font>
                </td>
                <td>
                  <el-input v-model="rptuintgroup.rptunitname"
                    @keyup.enter.native="getinputcode(); inputautofocus($event, 'popinput4')"
                    @blur.native.capture="getinputcode" ref="popinput4"></el-input>
                </td>
                <td>输 入 码</td>
                <td>
                  <el-input v-model="rptuintgroup.inputcode" @keyup.enter.native="inputautofocus($event, 'popinput5')"
                    ref="popinput5" readonly></el-input>
                </td>

              </tr>
              <tr>
                <td>备注说明</td>
                <td colspan="5">
                  <el-input type="textarea" rows="2" v-model="rptuintgroup.comment" ref="popinput6"
                    @keyup.enter.native="inputautofocus($event, 'popinput6')" width="100%"></el-input>
                </td>
              </tr>
            </table>
          </el-form>
        </div>
        <div style="height:300px" class="popdialogstyle">
          <vxe-table show-overflow border ref="xTable3" height="auto" size="mini" @cell-dblclick="curtable_celldblclick"
            :loading="loading" :keyboard-config="keyConfig" :mouse-config="{ selected: true }" :data.sync="tableData3"
            show-header-overflow highlight-current-row highlight-hover-row resizable stripe
            :edit-config="{ trigger: 'click', mode: 'cell', showStatus: true }">
            <vxe-table-column type="index" title="NO." width="60" header-align="center" align="center"></vxe-table-column>
            <vxe-table-column field="rptunitname" title="报告单元名称(双击开窗)" width="200" header-align="center">
              <!-- <template v-slot="{row}">
                              <rm-ddl-rptunit prgno="LIS134" :appendtobody="true" @change="rptunitchange($event,row)" v-model="row.rptunitname" width="180px"></rm-ddl-rptunit>
                          </template> -->
            </vxe-table-column>
            <vxe-table-column field="rptunitid" title="报告单元ID" width="150" header-align="center" key="rptunitid">
            </vxe-table-column>
            <vxe-table-column field="seq" title="序号" width="100" header-align="center"
              :edit-render="{ name: 'input', autoselect: true }">
            </vxe-table-column>
          </vxe-table>
        </div>
      </div>
      <div v-else><span class="el-icon-info">确定删除报告单元组合名称为<b style="color:red">{{ message }}</b>的记录吗？</span></div>
      <span slot="footer" class="dialog-footer" v-if="dialogshow">
        <el-button @click.native="addRow()" class="mt-3" size="small" icon="el-icon-plus">新 增</el-button>
        <el-button @click.native="delRow()" class="mt-3" size="small" icon="el-icon-minus">删 除</el-button>
        <el-button @click.native="SubmitForm()" class="mt-3" size="small">确 定</el-button>
        <el-button @click="dialogVisible = false" :autofocus="true">取 消</el-button>
      </span>
      <span slot="footer" class="dialog-footer" v-else>
        <el-button @click.native="SubmitForm()" class="mt-3" size="small">确 定</el-button>
        <el-button @click="dialogVisible = false" :autofocus="true">取 消</el-button>
      </span>
    </el-dialog>
    <el-dialog v-el-drag-dialog :append-to-body="true" :close-on-click-modal="false" title="请选择报告单元"
      :visible.sync="poprptunitvisible">
      <rm-pop-rptunit @change="rptunitchange" @cancel="poprptunitvisible = false" width="100%" key="rptunitid"
        title="请选择报告单元" :visible.sync="poprptunitvisible"></rm-pop-rptunit>
    </el-dialog>
  </div>
</template>

<script type="text/javascript">
import XEUtils from "xe-utils";
export default {
  name: "LIS134",
  data() {
    return {
      txtsearch: "",
      txtgroupclass: "",
      detailid: "",
      operatetype: "",
      headtitle: "",
      dialogwidth: "",
      message: "",
      hospitalcode: this.$tool.getSession(this.$tool.selectedhis),
      utype: this.$tool.getSession(this.$tool.loginutype),
      tempindex: 0,
      dialogdetailcount: 1,
      hightrow: 0,
      dialogshow: true,
      loading: false,
      firstquery: true,
      okFirstLoading: true,
      dialogVisible: false,
      tempData: [],
      rptuintgroup: {},
      tableData1: [],
      oldformdata: {},
      tableData2: [],
      tableData3: [],
      groupclassOptions: [
        { value: "", label: "" },
        { value: "1", label: "检验质量指标上报(标本可接受性)" },
        { value: "2", label: "检验质量指标上报(检验报告)" },
        { value: "3", label: "检验质量指标上报(周转时间)" },
        { value: "4", label: "自动分配样本号" },
        { value: "5", label: "TAT统计" },
        { value: "6", label: "报告列表筛选条件" }
      ],
      keyConfig: {
        isDel: true,
        isTab: true,
        isEdit: true
      },
      keyLocalConfig: {
        isArrow: true
      },
      rptuintgroup: {
        rptunitname: "",
        seq: ""
      },
      poprptunitvisible: false,
      clickrow: null,
    };
  },
  watch: {
    txtsearch(val) {
      var length = this.tableData1.length;
      if (this.hightrow > 0) {
        this.hightrow = 0;
      }
      this.$nextTick(() => {
        var row = this.$refs.xTable1.getCurrentRow();
        if (this.$refs.xTable1.tableData.length > 0) row = this.$refs.xTable1.tableData[0];
        if (row.rptunitgroupid) {
          this.tempindex = this.$refs.xTable1.getRowIndex(row);
          this.comcallfun();
        }
      });
    },
    txtgroupclass(val) {
      var length = this.tableData1.length;
      if (this.hightrow > 0) {
        this.hightrow = 0;
      }
      this.$nextTick(() => {
        var row = this.$refs.xTable1.getCurrentRow();
        if (this.$refs.xTable1.tableData.length > 0) row = this.$refs.xTable1.tableData[0];
        if (row.rptunitgroupid) {
          this.tempindex = this.$refs.xTable1.getRowIndex(row);
          this.comcallfun();
        }
      });
    }
  },
  computed: {
    list() {
      if (this.txtsearch != "" || this.txtgroupclass != "") {
        let rest = this.tableData1;
        if (this.txtsearch != "") {
          rest = rest.filter(item => item.rptunitgroupname.indexOf(this.txtsearch) > -1 || item.inputcode.toUpperCase().indexOf(this.txtsearch.toUpperCase()) > -1 || item.rptunitgroupid == this.hightrow);
        }
        if (this.txtgroupclass != "") {
          rest = rest.filter(item => item.rptunitgroupid == this.hightrow || item.unitkind == this.txtgroupclass);
        }
        return rest;
      } else {
        return this.tableData1;
      }
    }
  },
  created() {
    this.initialList(); //初始化主列表
  },
  mounted() { },
  updated() {
    if (this.okFirstLoading) {
      this.comcallfun();
    }
  },
  methods: {
    curtable_celldblclick({ row, rowIndex, $rowIndex, column, columnIndex, $columnIndex, cell }, event) {
      if (column.property == "rptunitname") {
        this.clickrow = row;
        this.poprptunitvisible = true;
      }
    },
    refreshrecord() {
      this.txtsearch = "";
      this.txtgroupclass = "";
      this.initialList();
    },
    initialList() {
      this.loading = true;
      this.$tool
        .request({
          url: "LIS/LIS1/LIS134",
          method: "post",
          data: {
            action: "query"
          }
        })
        .then(response => {
          this.tableData1 = response.Data;
          // this.tableData1.sort((a, b) => {
          //     return a.seq - b.seq;
          // });
          this.tempData = response.Data;
          this.loading = false;
          this.okFirstLoading = true;
        })
        .catch(e => {
          this.loading = false;
        });
    },
    comcallfun() {
      if (this.$refs.xTable1.tableData.length > 0) {
        var selectrow = [];
        if (this.hightrow > 0) {
          selectrow = this.$refs.xTable1.tableData.filter(item => {
            return item.rptunitgroupid == this.hightrow;
          })[0];
        } else {
          if (this.tempindex > 0) selectrow = this.$refs.xTable1.getData(this.tempindex);
          else selectrow = this.$refs.xTable1.getData(0);
        }
        this.$nextTick(() => {
          let currentrow = selectrow;
          if (currentrow) {
            this.okFirstLoading = false;
            this.$refs.xTable1.setCurrentRow(currentrow);
            this.message = currentrow.rptunitgroupname;
            this.detailid = currentrow.rptunitgroupid;
            this.$refs.xTable1.scrollToRow(currentrow);
            this.rptuintgroup = {
              //选中删除列位置赋值
              rptuintgroupid: currentrow.rptunitgroupid,
              seq: currentrow.seq,
              groupclass: currentrow.unitkind,
              rptunitname: currentrow.rptunitgroupname,
              inputcode: currentrow.inputcode,
              subitemnum: currentrow.detailcount,
              comment: currentrow.description,
              hospcode: currentrow.hospcode
            };
            this.ShowDetail();
          }
        });
      }
    },
    inputautofocus(event, element) {
      if (element == "popinput5") return false;
      let arr = ["popinput1", "popinput2", "popinput3", "popinput4", "popinput5"];
      let index = XEUtils.findIndexOf(arr, item => item == element);
      var that = this;
      var focusIndex = index + 1;
      var ele = arr[focusIndex];
      setTimeout(function () {
        if (index == 1) {
          that.$refs[element].blur();
        }
        that.$refs[ele].focus();
      }, 1);
    },
    ShowDetail() {
      this.$tool
        .request({
          url: "LIS/LIS1/LIS134",
          method: "post",
          data: {
            action: "querydetail",
            rptunitgroupid: this.detailid
          }
        })
        .then(res => {
          this.tableData2 = res.Data;
          this.loading = false;
        });
    },
    ExportCsv() {
      let options = {
        filename: "LIS134 报告单元组合 detail.csv"
      };
      this.$refs.xTable1.exportCsv(options);
    },
    currentChangeEvent({ row, $rowIndex }) {
      this.tempindex = $rowIndex;
      this.detailid = row.rptunitgroupid;
      this.message = row.rptunitgroupname;
      this.rptuintgroup = {
        //点击列赋值
        rptuintgroupid: row.rptunitgroupid,
        seq: row.seq,
        groupclass: row.unitkind,
        rptunitname: row.rptunitgroupname,
        inputcode: row.inputcode,
        subitemnum: row.detailcount,
        comment: row.description,
        hospcode: row.hospcode
      };
      this.ShowDetail();
    },
    OpenDialog(k) {
      this.operatetype = k;
      if (k == 1) {
        //新增
        this.dialogshow = true;
        this.headtitle = "新增报告单元组合";
        this.dialogwidth = "45%";
        this.dialogVisible = true;
        this.rptuintgroup = {
          //点击列赋值
          rptuintgroupid: "",
          seq: "",
          groupclass: "",
          rptunitname: "",
          inputcode: "",
          subitemnum: "",
          comment: "",
          hospcode: this.hospitalcode
        };
        this.$nextTick(() => {
          this.$refs.popinput1.focus();
        });
        this.tableData3 = [];
      } else if (k == 2) {
        //修改
        if (this.utype != "G" && this.rptuintgroup.hospcode == "All") {
          this.$alert("您不是管理员，不能修改医院代码为All的数据！", "提示", {
            confirmButtonText: "确定"
          });
          return false;
        } else {
          this.getPopData();
          this.dialogshow = true;
          this.headtitle = "修改报告单元组合";
          this.dialogwidth = "45%";
          this.dialogVisible = true;
          this.tableData3 = this.temptableData3;
          this.$nextTick(() => {
            this.$refs.popinput1.focus();
          });
        }
      } else {
        //删除
        if (this.utype != "G" && this.rptuintgroup.hospcode == "All") {
          this.$alert("您不是管理员，不能删除医院代码为All的数据！", "提示", {
            confirmButtonText: "确定"
          });
          return false;
        } else {
          this.dialogshow = false;
          this.headtitle = "提示";
          this.dialogwidth = "30%";
          this.dialogVisible = true;
        }
      }
    },
    getPopData() {
      //修改后台获取弹窗数据
      this.$tool
        .request({
          url: "LIS/LIS1/LIS134",
          method: "post",
          data: {
            action: "queryforupdate",
            rptunitgroupid: this.detailid
          }
        })
        .then(res => {
          let row = res.RData1.Data[0];
          this.rptuintgroup = {
            rptuintgroupid: row.rptunitgroupid,
            seq: row.seq,
            groupclass: row.unitkind,
            rptunitname: row.rptunitgroupname,
            inputcode: row.inputcode,
            subitemnum: row.detailcount,
            comment: row.description,
            hospcode: row.hospcode
          };
          this.oldformdata = {
            rptunitgroupid: row.rptunitgroupid,
            seq: row.seq,
            unitkind: row.unitkind,
            rptunitgroupname: row.rptunitgroupname,
            inputcode: row.inputcode,
            detailcount: row.detailcount,
            description: row.description,
            hospcode: row.hospcode
          };
          this.tableData3 = res.RData2.Data;
          this.loading = false;
        })
        .catch(e => {
          console.log("error", e);
        });
    },
    SubmitForm() {
      let tabledata = "";
      if (this.operatetype == 2 || this.operatetype == 1) {
        //修改或新增
        if (this.rptuintgroup.rptunitname == "") {
          this.$message({
            message: "请填写报告单元组合名称！",
            type: "warning"
          });
          return false;
        }
        let xTable3date = this.$refs.xTable3.tableData; //主表修改
        xTable3date.sort((a, b) => {
          return a.seq - b.seq;
        });
        for (let i = 0, len = xTable3date.length; i < len; i++) {
          xTable3date[i].seq = (i + 1) * 10;
        }
        tabledata = this.$refs.xTable3.getRecordset();

        let insertresult = [];
        let insertobj = tabledata.insertRecords;
        for (var i = 0; i < insertobj.length; i++) {
          var obj = insertobj[i];
          if (!!obj["rptunitid"]) {
            insertresult.push(obj);
          }
        }
        tabledata.insertRecords = insertresult;
        let updateobj = tabledata.updateRecords;
        for (var i = 0; i < updateobj.length; i++) {
          var obj = updateobj[i].cdata;
          if (!obj["rptunitid"]) {
            this.$message({
              message: "请勿将数据更新为空值(序号：" + obj["seq"] + ")，如不需要，请删除！",
              type: "warning"
            });
            return false;
          }
        }
      }
      let formdata = {
        rptunitgroupid: this.rptuintgroup.rptuintgroupid == "" ? "0" : this.rptuintgroup.rptuintgroupid,
        seq: this.rptuintgroup.seq,
        unitkind: this.rptuintgroup.groupclass == null ? "" : this.rptuintgroup.groupclass,
        rptunitgroupname: this.rptuintgroup.rptunitname == null ? "" : this.rptuintgroup.rptunitname,
        inputcode: this.rptuintgroup.inputcode == null ? "" : this.rptuintgroup.inputcode,
        detailcount: this.rptuintgroup.subitemnum == null ? "" : this.rptuintgroup.subitemnum,
        description: this.rptuintgroup.comment == null ? "" : this.rptuintgroup.comment,
        hospcode: this.rptuintgroup.hospcode == null ? "" : this.rptuintgroup.hospcode
      };
      this.$tool
        .request({
          url: "LIS/LIS1/LIS134",
          method: "post",
          data: {
            action: "save",
            utype: this.operatetype,
            saveinfo: formdata,
            oldinfo: this.oldformdata,
            urec: tabledata
          }
        })
        .then(response => {
          if (response.errcode == "1") {
            this.$message({
              message: "操作成功！",
              type: "success"
            });
            this.dialogVisible = false;
            this.initialList();
            this.tempData = this.$refs.xTable1.getData();
            if (this.operatetype == 1) {
              //新增时记录新增数据的主键
              this.hightrow = response.keyid + "";
            } else {
              this.hightrow = 0;
            }
          } else {
            this.$message({
              message: "保存失败！" + response.errmsg,
              type: "warning"
            });
          }
        });
    },
    computesubitem() {
      let xTable3date = this.$refs.xTable3.tableData; //子项个数计算
      this.rptuintgroup.subitemnum = xTable3date.length;
    },
    addRow() {
      this.dialogdetailcount = 1;
      let oridata = this.$refs.xTable3.tableData;
      if (oridata.length > 0) {
        oridata.forEach(item => {
          if (this.dialogdetailcount <= Number(item.seq / 10)) {
            this.dialogdetailcount = Number(item.seq / 10) + 1;
          }
        });
      }
      let rowseq = this.dialogdetailcount * 10;
      this.$refs.xTable3
        .insert({
          rptunitname: "",
          rptunitid: "",
          seq: rowseq
        })
        .then(({ row, rowIndex }) => {
          this.computesubitem();
          let rows = this.$refs.xTable3.tableData;
          let selectrow = "";
          for (var i = 0; i < rows.length; i++) {
            if (rows[i].seq == rowseq) {
              selectrow = rows[i];
              break;
            }
          }
          if (selectrow && selectrow != "") {
            this.$refs.xTable3.setCurrentRow(selectrow);
            // this.$refs.xTable3.$refs.tableBody.$children[0].$refs.ddlrptunitSelect.focus();
            this.$refs.xTable3.setActiveRow(selectrow, "seq");
          }
        });
    },
    delRow() {
      var delrow = this.$refs.xTable3.getCurrentRow();
      if (delrow) {
        this.$table.DelRecordSelect(this.$refs.xTable3, -1, this);
        // this.$refs.xTable3.remove(delrow);
        // let havedata = this.$refs.xTable3.getTableData().fullData;
        // if (havedata.length > 0) {
        //     let selectrow = this.$refs.xTable3.getTableData().fullData[havedata.length - 1];
        //     this.$refs.xTable3.setCurrentRow(selectrow);
        // }
      } else {
        this.$message({
          message: "请先选中要删除的项目",
          type: "warning"
        });
      }
      this.computesubitem();
    },
    getinputcode() {
      let thisinputcode = "";
      let getpinyin = this.$pinyin(this.rptuintgroup.rptunitname, {
        style: this.$pinyin.STYLE_FIRST_LETTER, // 首字母
        heteronym: true
      });
      for (var i = 0; i < getpinyin.length; i++) {
        var curchar = getpinyin[i];
        if (curchar.length > 1) {
          thisinputcode += curchar[0];
        } else {
          thisinputcode += curchar;
        }
      }
      this.rptuintgroup.inputcode = thisinputcode.toUpperCase();
    },
    rptunitchange(c, n) {
      this.$refs.xTable3.setCurrentRow(this.clickrow);
      let flag = false;
      let oridata = this.$refs.xTable3.tableData;
      if (oridata.length > 0) {
        oridata.forEach(item => {
          if (item.rptunitid == c) {
            flag = true;
            return false;
          }
        });
      }
      if (flag) {
        this.$message({
          message: "已存在该明细项目，请勿重复添加！",
          type: "warning"
        });
        flag = false;
        return false;
      }
      this.clickrow.rptunitid = c;
      this.clickrow.rptunitname = n;
      this.poprptunitvisible = false;
    },
    initialListSearch() {
      this.tempindex = 0;
      let record = [];
      if (this.firstquery) {
        record = this.$refs.xTable1.getData();
        this.tempData = record;
      } else {
        record = this.tempData;
      }
      this.firstquery = false;
      if (this.txtsearch != "") {
        record = record.filter(item => item.rptunitgroupname.indexOf(this.txtsearch) > -1 || item.inputcode.toUpperCase().indexOf(this.txtsearch.toUpperCase()) > -1);
      } else if (this.txtgroupclass != "") {
        record = record.filter(item => item.unitkind == this.txtgroupclass);
      } else {
        record = this.tempData;
      }
      this.tableData1 = record;
      this.comcallfun();
    }
  }
};
</Script>

<style scoped>
.pagetop {
  width: 100%;
  height: 70px;
  display: -webkit-box;
  -webkit-box-pack: left;
  -webkit-box-align: center;
  position: absolute;
  z-index: 99;
  border: 1px solid #ccc;
}

.pagecenter {
  position: absolute;
  top: 75px;
  width: 100%;
  left: 0;
  bottom: 0px;
  overflow: auto;
}

.middle-center {
  position: absolute;
  height: 100%;
  left: 0px;
  right: 345px;
  overflow: auto;
}

.middle-right {
  position: absolute;
  height: 100%;
  width: 340px;
  right: 0px;
}

.table1style tr td {
  padding: 0px 2px 0px 5px;
}

/deep/.popdialogstyle tr td div .el-input__inner {
  border: 1px solid rgba(255, 254, 254, 0) !important;
  background-color: rgba(255, 254, 254, 0) !important;
}</style>